#include "Character/Character.h"
#include "Cats/CatsManager.h"
#include "CharacterSpeedInstruction.h"

using namespace cocos2d;

//===== DESTRUCTOR =====
CharacterSpeedInstruction::~CharacterSpeedInstruction(void)
{

}

//===== PUBLIC FUNCTIONS =====

/*!
    @function runInstruction
    @param		pCharacter : Character
				modify some value of the Character class
    @result		run instruction to modify Character class
*/
void CharacterSpeedInstruction::runInstruction(Character* pCharacter, CatsManager* pCatManager)
{
	if( pCharacter != 0 )
	{
		CCLog("Instruction (CharSpeed): Character moving at %f times its speed.", _derivedValue);
		pCharacter->updateDirectorSpeed(_derivedValue);
	}
}
